package com.myx.zookeeper.znode;

import com.myx.zookeeper.ZookeeperSimpleConstant;
import com.myx.zookeeper.comm.CommCrud;
import lombok.Data;
import org.apache.zookeeper.ZooKeeper;

import java.io.IOException;

/**
 * 描述:实现zookeeper的基础增删改查
 * @author: myx
 * @date: 2018/11/17
 * Copyright © 2018-hotpot. All rights reserved.
 */
@Data
public class ZKHelloCrud {
    private CommCrud commCrud;
    /**
     * 构造器
     */
    public ZKHelloCrud() {
        try {
            commCrud=new CommCrud(new ZooKeeper(ZookeeperSimpleConstant.connectString,5000,null));
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

}
